<template>
	<view class="supply-chain" @click="linkDetail(item.id)">
		<text class="supply-chain-title">{{item.title}}</text>
		<view class="supply-chain-list">
			<block v-for="v in item.list" :key="v.id">
				<view class="supply-chain-item">
					<image :src="v.img" alt="logo" mode="aspectFill" class="supply-chain-image" />
					<text class="supply-chain-label">{{v.label}}</text>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['item'],
		name:"SupplyChainCard",
		data() {
			return {
				
			};
		},
		methods: {
			linkDetail(id) {
				uni.navigateTo({
					url: `/pages/supplyChainDetail/supplyChainDetail?id=${id}`,
					animationType: 'slide-in-right', // 指定动画类型
					animationDuration: 1000 // 动画时长
				})
			}
		}
	}
</script>

<style scoped>
	.supply-chain {
		margin-bottom: 60rpx;
	}
	.supply-chain-title {
		font-size: 32rpx;
		font-weight: bold;
		margin: 32rpx 0;
	}
	.supply-chain-list {
		display: flex;
		flex-wrap: wrap;
	}
	.supply-chain-item {
		width: 20%;
		display: flex;
		justify-content: space-between;
		flex-direction: column;
		align-items: center;
		margin-top: 20rpx;
	}
	.supply-chain-image {
		width: 80rpx;
		height: 80rpx;
		border-radius: 20rpx;
	}
	.supply-chain-label {
		font-size: 20rpx;
		display: block;
		margin-top: 8rpx;
		color: #666666;
	}
</style>